home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / System7 tools / D / Décor 1.2 Folder / Programmer info < prev    next >
Encoding:
Text File  |  1993-11-11  |  1.9 KB  |  51 lines  |  [TEXT/R*ch]

  1. Programmer Information :
  2.  
  3. Starting with version 1.1, Décor defines a custom Gestalt selector in order to allow communication
  4. between the cdev and the trap patches. The selector is 'FrçP'. The returned value is a pointer on the
  5. following structure :
  6.  
  7. // Version 1.1.*
  8.  
  9. #define        version11            1100L
  10.  
  11. typedef struct {
  12.   long      version;
  13.             /* Version number */
  14.   GWorldPtr world;
  15.             /* This GWorld contains the picture and is located in High RAM */
  16.   Rect      mainScreen;
  17.             /* simply (*GetMainDevice())->gdRect. Stored here to save time */
  18.   Boolean   standardPat;
  19.             /* if set, the patches use DeskCPat instead of the picture */
  20. } GlobalsRec, *GlobalsPtr;
  21.  
  22. // Version 1.2 and up
  23.  
  24. #define        version12            1200L
  25.  
  26. typedef struct {
  27.   long      version;
  28.             /* Version number */
  29.   GWorldPtr world;
  30.             /* This GWorld contains the picture and is located in High RAM */
  31.   Rect      mainScreen;
  32.             /* simply (*GetMainDevice())->gdRect. Stored here to save time */
  33.   Boolean   standardPat;
  34.             /* if set, the patches use DeskCPat instead of the picture */
  35.   Boolean    checkDepth;
  36.               /* if set, the patches draw the picture only if the current depth is equal to orgDepth */
  37.   short        orgDepth;
  38.               /* original screen depth, recorded during startup. This is the depth of 'world' */
  39. } GlobalsRec, *GlobalsPtr;
  40.  
  41. Before using the structure, make sure that the version field contains a known value. Otherwise,
  42. you are dealing with a new version, and the structure may have changed.
  43.  
  44. You can change the picture by drawing something into world and forcing a desktop redraw.
  45. In order to easily redraw the desktop, use PaintOne (NULL, GetGrayRgn());
  46. You can revert to the standard desktop pattern by setting standardPat to 1 and redrawing the
  47. desktop.
  48.  
  49. If you create a program that takes advantage of this information, please drop a mail at
  50. pottier@dmi.ens.fr - I'd like to know about it!
  51.